home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: news.UVic.CA!news
- From: bmury@engr.uvic.ca (Brian Mury)
- Subject: Re: Assembler Linking, which?
- Message-ID: <1490.6573T900T2844@engr.uvic.ca>
- Sender: news@sol.UVic.CA
- Nntp-Posting-Host: p18-132.dialup.uvic.ca
- Organization: University of Victoria
- X-Newsreader: THOR 2.22 (Amiga;TCP/IP) *UNREGISTERED*
- References: <4c3l3rINNh90@newsman.murdoch.edu.au>
- Date: Sun, 31 Dec 95 23:23:10 GMT
-
- >Im probably an ok asm coder, but what I cant figure out is this.
-
- >Using asmOne that I have from aminet , Im wondering how you can
- >link an external object module to the asm code.
-
- >Lets say that I wnat to call printf from asmone,
-
- > do I incbin include/amiga.lib
- > or XREF XDEF or what, ..
-
- >I know that in C it is possible to join various object.o files for use by
- >my c program using a program called BLINK ok, but how is it done in asmOne.
-
- >Basically I desperately need to find out how to include obj modules
- >in a given package like asmone or devpac or monam? without seperately using
- >a program like blink!!
-
- >Thanx in advance, Im hoping that its an eay answer.
-
- Ok, say I've got a C program that's been compiled to an object module and is
- called mycprog.o. It contains a routine called mycroutine which I wish to call
- from assembly. I would do something like this:
-
- XREF mycroutine
- ...
- ...
- ...
- bsr mycroutine
-
- then assemble it to an object module (say, myasmprog.o). Then link them with
- the linker of your choosing:
-
- blink myasmprog.o mycprog.o
-
- If you want to use a routine in amiga.lib, you would do something along the
- lines of:
-
- blink myasmprog.o LIB amiga.lib
-
-
- --
- Brian Mury <b.mury@ieee.org> http://www-engr.uvic.ca/~bmury
- 3rd year Comp. Eng., University of Victoria, Victoria, B.C., Canada
- PGP key: email with subject "REQUEST PGPKEY"; Whitewater Kayak/Skydive!
- GE -d+ p c++++ l- u+ e+ m(++) s+/-- n+(---) h f g+ w+ t+ r-- y*
-
-